package com.egg.common.core.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 数据库实体基类
 *
 * @author east
 */
@Data
public class BaseEntity implements Serializable {


    @ApiModelProperty(value = "主键ID")
    @TableId(value = "id", type = IdType.INPUT)
    private Long id;

    @ApiModelProperty(value = "创建者")
    @TableField(value = "creator")
    private Long creator;

    @ApiModelProperty(value = "更新者")
    @TableField(value = "modifier")
    private Long modifier;

    @ApiModelProperty(value = "创建日期")
    @TableField(value = "create_date")
    private LocalDateTime createDate;

    @ApiModelProperty(value = "更新日期")
    @TableField(value = "modify_date")
    private LocalDateTime modifyDate;

    @ApiModelProperty(value = "备注")
    @TableField(value = "remark")
    private String remark;

    @TableLogic
    @TableField(value = "deleted")
    @ApiModelProperty(value = "软删除: false正常,true删除")
    private Boolean deleted;


}